import service from '@/utils/request'
import qs from 'qs'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service

const request = {
    // 获取对象
    getObjectByRelationId (params) {
        return httpGet({
            url: '/oss/getObjectByRelationId',
            params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    // 对象删除RecordId({ recordId: value })，系统生成的唯一id
    deleterRecordId (params) {
        return httpPost({
            url: '/oss/deleterRecordId',
            params: qs.stringify(params),
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    // 对象删除RelationId({relationId:value})，可以自己上传的唯一id
    deleterByRelationId (params) {
        return httpPost({
            url: '/oss/deleterByRelationId',
            params: qs.stringify(params),
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
}

export default request
